import request from '@/util/request'

export default {
    // 1. 查询所有学生
    findStudents(){
        return request({
            url: '/student/list.do',
            method: 'get',
        })
    },
    // 2. 分页查询学生
    findByPage(page,pageSize) {
        return request({
            url: `/student/findByPage.do?page=${page}&pageSize=${pageSize}`,
            method: 'get',
        })
    },
    // 3. 条件查询带分页
    search(page,pageSize,data){
        return request({
            url: `/student/search.do?page=${page}&pageSize=${pageSize}`,
            method: 'post',
            data
        })
    },
    // 4. 保存学生
    save(data){
        return request({
            url: '/student/save.do',
            method: 'post',
            data
        })
    }
}
